function [  ] = draw_polygons( polygon_file, nb_verts )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here

file_id = fopen(polygon_file, 'r');
try
    color = [rand rand rand];
    data = fscanf(file_id, '%c %f %f\n', [3 2*nb_verts]);
    plot(data(2, 1:nb_verts), data(3, 1:nb_verts), 'Color', color, 'LineStyle', '-');
    hold on;
    plot([data(2, nb_verts) data(2, 1)], [data(3, nb_verts) data(3, 1)], 'Color', color, 'LineStyle', '-');
    fclose(file_id);
catch me
    fclose(file_id);
    rethrow(me);
end

end

